﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
namespace QLBV.Models
{
    public class QLBVContext: DbContext
    {
        public QLBVContext() : base("name = QLBVContext") { }
        public DbSet<Menus> Menus { get; set; }
        public DbSet<Employees> Employees { get; set; }
        public DbSet<News> News { get; set; }
    }
    public class Menus
    {
        public int ID { get; set; }
        [Required(ErrorMessage = "Chưa nhập tên menu")]
        public string Name { get; set; }
        [Required(ErrorMessage = "Chưa nhập liên kết")]
        public string Link { get; set; }
        public int Location { get; set; }
        public int Parent_ID { get; set; }
        [Required(ErrorMessage = "Chưa chọn trạng thái")]
        public bool Status { get; set; }
    }
    public class News
    {
        public int ID { get; set; }
        public string Title { get; set; }
        public string Content { get; set; }
        public int View { get; set; }
        public bool Status { get; set; }
        public DateTime CreaDate { get; set; }
        public string UserAdd { get; set; }
        public string Images { get; set; }
    }
    public class Employees
    {
        public int ID { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
        public string Name { get; set; }
        public DateTime Birthday { get; set; }
        public string Place { get; set; }
        public int Position_ID { get; set; }
        public int Permissions { get; set; }
        public string Avatar { get; set; }
    }
}